home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Desktop Improver / NewIconsV2 / Extras / include / libraries / newicon.h
Encoding:
C/C++ Source or Header  |  1996-09-27  |  2.2 KB  |  64 lines

  1. #ifndef LIBRARIES_NEWICON_H
  2. #define LIBRARIES_NEWICON_H
  3.  
  4. #ifndef EXEC_LIBRARIES_H
  5. #include <exec/libraries.h>
  6. #endif
  7.  
  8. #ifndef WORKBENCH_WORKBENCH_H
  9. #include "workbench/workbench.h"
  10. #endif
  11.  
  12.  
  13. struct NewIconBase
  14. {
  15.     struct Library nib_Lib;
  16.     APTR nib_SegList;
  17.     LONG nib_Precision; /* precision when remapping images via */
  18.                 /* RemapChunkyImage(). Programs are not supposed */
  19.                 /* to modify this, it is a value chosen by the user */
  20.                 /* when NewIcons is started. */
  21.     LONG nib_Flags; /* (available since newicon.library V38) see below */
  22.                 /* Again, programs are not supposed to modify this, it is */
  23.                 /* determined by the user when NewIcons is started. */
  24. };
  25.  
  26.  
  27. #define NIFLG_DO_DITHER (1<<0)  /* use dithering when exact pen not available */
  28.  
  29.  
  30.  
  31. /*
  32.  * This structure contains an image in a format unusual to the Amiga: chunky
  33.  * pixel. We use this format because it is faster to remap to a given palette.
  34.  */
  35. struct ChunkyImage
  36. {
  37.     UWORD Width;        /* width of the image. Must be <= 93 */
  38.     UWORD Height;       /* height of the image. Must be <= 93 */
  39.     UWORD NumColors;    /* number of pens defined in the palette. Must be <= 256 */
  40.     UWORD Flags;        /* see defines below */
  41.     UBYTE *Palette;     /* array of RGB components of the pens (one byte per gun) */
  42.     UBYTE *ChunkyData;  /* Width*Height bytes storing the colors of the pixels */
  43. };
  44.  
  45. #define CIF_COLOR_0_TRANSP  (1<<0)  /* color 0 is transparent, not the one */
  46.                                     /* stored in palette */
  47.  
  48. #define CIF_DEFAULT         (1<<1)  /* when this bit is set, the image was */
  49.                                     /* obtained via the DEFAULTIMAGE ToolType, */
  50.                                     /* therefore it is not actually part of the */
  51.                                     /* icon and will not be stored in the */
  52.                                     /* ToolTypes on a PutNewDiskObject(). */
  53.  
  54.  
  55.  
  56. struct NewDiskObject
  57. {
  58.     struct DiskObject *ndo_StdObject;       /* The old-style icon */
  59.     struct ChunkyImage *ndo_NormalImage;    /* May be NULL, meaning no new style icon */
  60.     struct ChunkyImage *ndo_SelectedImage;  /* May be NULL, meaning no secondary image */
  61. };
  62.  
  63. #endif  /* LIBRARIES_NEWICON_H */
  64.